﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;
using System.Text;
using System.Threading.Tasks;

namespace DemoCore.Routings
{
    /// <summary>
    /// Host接口
    /// </summary>
    [ServiceContract]
    public interface IHost
    {
        /// <summary>
        /// 注册服务
        /// </summary>
        /// <param name="host"></param>
        [OperationContract]
        void RegisterHost(SubHost host);

        /// <summary>
        /// 获取服务信息集
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        IList<HostInfo> GetHostInfos();

        /// <summary>
        /// 是否停止
        /// </summary>
        /// <param name="address"></param>
        /// <returns></returns>
        [OperationContract]
        bool Stop(string address);

        /// <summary>
        /// 是否启动
        /// </summary>
        /// <param name="address"></param>
        /// <returns></returns>
        [OperationContract]
        bool Start(string address);
    }
}
